import Axios from '@/utils/request';

/**
 * 关联方池-查询池信息
 */
export function queryGroupInfo(data) {
    return Axios({
        url: '/componyPool/issueGroup/relation/queryGroupInfo',
        method: 'post',
        data: data,
    });
}

/**
 * 关联方池-查询所有池信息
 */
export function getRelationAll() {
    return Axios({
        url: '/componyPool/issueGroup/relation/all',
    });
}

/**
 * 新增董监高池机构
 */
export function addLeaderIssue(data) {
    return Axios({
        url: '/componyPool/issueGroup/relation/leaderIssue',
        method: 'post',
        data: data,
    });
}

/**
 * 查询池下发行人信息(高级查询)
 */
export function queryGroupIssueInfo(data) {
    return Axios({
        url: '/componyPool/issueGroup/relation/queryGroupIssueInfo',
        method: 'post',
        data: data,
    });
}

/**
 * 查询池下发行人信息
 */
export function getIssueInfoByGroupCode(groupCode) {
    return Axios({
        url: '/componyPool/issueGroup/issueList/' + groupCode,
    });
}

/**
 * 关联方池-编辑池明细添加数据
 */
export function insertIssue(data) {
    return Axios({
        url: '/componyPool/issueGroup/relation/insertIssue',
        method: 'post',
        data: data,
    });
}

/**
 * 下达人下拉数据
 */
export function getInstructionUser() {
    return Axios({
        url: '/instruction/user/select',
        method: 'post',
    });
}

/**
 * 关联方池-操作日志查询
 */
export function poolLogSelect(data) {
    return Axios({
        url: '/componyPool/issueGroup/relation/poolLogSelect',
        method: 'post',
        data: data,
    });
}

/**
 * 关联方池-操作日志详情查询
 */
export function poolDetailLogByDetailId(detailId) {
    return Axios({
        url: '/componyPool/issueGroup/relation/poolDetailLog/' + detailId,
    });
}

/**
 * 关联方池-删除池明细
 */
export function deleteIssue(isGrCode, data) {
    return Axios({
        url: '/componyPool/issueGroup/relation/deleteIssue/' + isGrCode,
        method: 'delete',
        data: data,
    });
}

/**
 * 导入模板下载,category: 1 托管池模板 2管理人池模板 3董监高池模板
 */
export function importTemplate(category: string) {
    return Axios({
        url: '/componyPool/import/template/' + category,
        method: 'post',
    });
}
